package me.ahoukuse.koala.dao;

import me.ahoukuse.koala.po.FileEntity;
import me.ahoukuse.koala.po.FolderNode;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface FileEntityDao {
    void insertOne(FileEntity fileEntity);
    void insertBatch(List<FileEntity> fileEntities);
    List<FileEntity> getFiles(int userId, int parentId);

    List<FileEntity> getFileByIds(List<String> ids);

    List<FileEntity> getFileBySharedCode(String sharedCode);

    FileEntity getFile(int fileId);

    List<FolderNode> getFolderByFid(int userId, int parentId);

    void updateFileName(int fileId, String newName);

    int getFilesCount(int userId, int parentId);

    void deleteByIds(List<String> ids);

    void moveFilesTo(List<String> ids, int destFolderId);

    void copyFilesTo(List<String> ids, int destFolderId);
}
